package modler

import "gorm.io/gorm"

type User struct { //用户表
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type Role struct { //角色表
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}
type Node struct { //权限表
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}
type UserRole struct { //用户角色关联
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}
type RoleNode struct { //角色和权限关联
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}
type House struct {
	gorm.Model
	HouseCode string `gorm:"type:varchar(50)"` //仓库编号
	HouseName string `gorm:"type:varchar(50)"` //仓库名称
	HouseSum  string `gorm:"type:varchar(50)"` //仓库负责人
}

type HouseOrder struct {
	gorm.Model
	HouseOrderCode   string `gorm:"type:varchar(50)"` //订单编号
	HouseOrderName   string `gorm:"type:varchar(50)"` //供应商
	HouseOrderNum    string `gorm:"type:varchar(50)"` //数量
	HouseOrderPrince string `gorm:"type:varchar(50)"` //金额
	Hid              int    `gorm:"type:int"`         //仓库id
}
type HouseOrderList struct {
	OrderId          int    `gorm:"type:int"`
	HouseCode        string `gorm:"type:varchar(50)"` //仓库编号
	HouseName        string `gorm:"type:varchar(50)"` //仓库名称
	HouseSum         string `gorm:"type:varchar(50)"` //仓库负责人
	HouseOrderCode   string `gorm:"type:varchar(50)"` //订单编号
	HouseOrderName   string `gorm:"type:varchar(50)"` //供应商
	HouseOrderNum    string `gorm:"type:varchar(50)"` //数量
	HouseOrderPrince string `gorm:"type:varchar(50)"` //金额
}
